<template>
  <div class="chat">
    <CommonHeader :data="bannersData" />
    <ChatView :chatlist="chatlist"  />
  </div>
</template>
<script>
import CommonHeader from "@/components/CommonHeader"
import ChatView from "@/components/ChatView/ChatView"

export default {
  name: 'Chat',
  data() {
    return {
      bannersData: [],
      chatlist:[],
    }
  },
  mounted(){
    this.$axios.get(this.HOST + "/api/chatList")
    .then(res =>{    
      this.chatlist.push(res.data) 
    })
    .catch(error =>{
      console.log(error)
    })
     this.$axios.get(this.HOST + "/api/chatListtwo")
    .then(res =>{    
      console.log(this.chatlist)
      this.chatlist.push(res.data)
    })
    .catch(error =>{
      console.log(error)
    })
     this.$axios.get(this.HOST + "/api/chatListthree")
    .then(res =>{    
      this.chatlist.push(res.data)
    })
    .catch(error =>{
      console.log(error)
    })
     this.$axios.get(this.HOST + "/api/chatListfour")
    .then(res =>{    
      this.chatlist.push(res.data) 
    })
    .catch(error =>{
      console.log(error)
    })
  },
  components: {
    CommonHeader,
    ChatView
  }
}

</script>
<style lang="css" scoped>
.chat {
  font-size: 0.16rem;
  margin-right: 0;

  /*background: #f5f5f5;*/
}

.tabs-screen {
  width: 85%;
  border-top: 1px solid #E0E0E0;
}

.chat-screen {
  width: 85%;
  position: fixed;
  border-left: 1px solid #E0E0E0;
  width: 0.55rem;
  height: 0.54rem;
  right: 0;
  top: 0.62rem;
  text-align: center;
  border-bottom: 1px solid #E0E0E0;
  border-top: 1px solid #E0E0E0;
}

.chat-screen i {
  font-size: 0.22rem;
  text-align: center;
  line-height: 0.53rem;
  color: #0F9F59;
}

.screen-list {
  width: 1.1rem;
  height: 2.5rem;
  background: #fff;
  position: fixed;
  right: 0;
  top: 1.18rem;
  box-shadow: 0 0 1px;
}

.screen-list ul {
  line-height: 0.4rem;
  text-align: center;
}

.actives {
  background: skyblue;
}

</style>
